package fr.afcepf.projet.hebergeur.data;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table
@Inheritance(strategy=InheritanceType.JOINED )
public class Abonnement{

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column
	private Long numAbo;
	private Date dateCreation;
	private Date dateRenouvellement;
	private Date dateFin;
	private Double prix;
	
	@ManyToOne
	@JoinColumn(name = "numClient")
	private Client client;
	
	public Abonnement() {
	}
	
	public Date getDateRenouvellement() {
		return dateRenouvellement;
	}

	public void setDateRenouvellement(Date dateRenouvellement) {
		this.dateRenouvellement = dateRenouvellement;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public Double getPrix() {
		return prix;
	}

	public void setPrix(Double prix) {
		this.prix = prix;
	}

	public Date getDateCreation() {
		return dateCreation;
	}

	public void setDateCreation(Date dateCreation) {
		this.dateCreation = dateCreation;
	}

	public Date getDateFin() {
		return dateFin;
	}

	public void setDateFin(Date dateFin) {
		this.dateFin = dateFin;
	}

	public Long getNumAbo() {
		return numAbo;
	}

	public void setNumAbo(Long numAbo) {
		this.numAbo = numAbo;
	}
}
